package com.cc.view.controller;

import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("book2")
public class BookController2{
    @PostMapping("/")
    @CrossOrigin(value = "http://localhost:8081",maxAge = 1800,allowedHeaders="*")
    public String addBook(String name) {
        return "receive:" + name;
    }
    @DeleteMapping("/{id}")
    @CrossOrigin(value = "http://localhost:8081" ,maxAge = 1800,allowedHeaders = "*")
    public String deleteBookByld(@PathVariable Long id) {
        return String.valueOf(id);
    }
 }